import * as veeValidate from 'vee-validate'
import {all} from '@vee-validate/rules'
import {localize} from '@vee-validate/i18n'
import zh_CN from '@vee-validate/i18n/dist/locale/zh_CN.json'
import yup from './yup'


veeValidate.configure({
    generateMessage:localize('zh_CN',zh_CN)
})


Object.keys(all).forEach(key=>{
    veeValidate.defineRule(key,all[key])
})


const modules = {yup,...veeValidate}

export default modules